<html>
<head><meta charset="utf-8"><title>type aliases and tuple structs · t-lang · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/index.html">t-lang</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html">type aliases and tuple structs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="200304185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304185">(Jun 09 2020 at 23:30)</a>:</h4>
<p>is there any push to make it so that type aliases of tuple structs can be constructed? I just noticed that the reference is <a href="https://github.com/rust-lang/reference/pull/831">out of date</a></p>



<a name="200304216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304216">(Jun 09 2020 at 23:31)</a>:</h4>
<p>my understanding is that this is the only way that <code>pub type foo = bar</code> differs from <code>pub use bar as foo</code></p>



<a name="200304311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304311">(Jun 09 2020 at 23:32)</a>:</h4>
<p>and presumably it is fixable, where the compiler could just insert an alias to the constructor as well as the type when the RHS of a <code>type</code> item is a tuple struct, but that this would be a breaking change</p>



<a name="200304327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304327">(Jun 09 2020 at 23:32)</a>:</h4>
<p>it seems like something we could and might want to fix in the upcoming edition</p>



<a name="200304336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304336">(Jun 09 2020 at 23:32)</a>:</h4>
<p>and relatively easy</p>



<a name="200304407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304407">(Jun 09 2020 at 23:34)</a>:</h4>
<p>I wasn't aware of that issue, but that seems entirely reasonable.</p>



<a name="200304437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304437">(Jun 09 2020 at 23:34)</a>:</h4>
<p>Why would this be a breaking change?</p>



<a name="200304441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304441">(Jun 09 2020 at 23:34)</a>:</h4>
<p>What code would it change the meaning of?</p>



<a name="200304449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304449">(Jun 09 2020 at 23:34)</a>:</h4>
<p>Oh. A function named with a non-standard capitalization?</p>



<a name="200304465"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304465" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304465">(Jun 09 2020 at 23:34)</a>:</h4>
<p>yea</p>



<a name="200304471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304471">(Jun 09 2020 at 23:35)</a>:</h4>
<p>which seems like its probably not something that people do</p>



<a name="200304527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304527">(Jun 09 2020 at 23:35)</a>:</h4>
<p>Actually, I think I have code doing it, but it specifically uses it to define an alias for the constructor function. :)</p>



<a name="200304544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304544">(Jun 09 2020 at 23:35)</a>:</h4>
<p>so it might be that we could implement this change and then do a crater and find nothing breaks but with an upcoming edition soon it just makes more sense to do it as part of the edition imo</p>



<a name="200304548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304548">(Jun 09 2020 at 23:35)</a>:</h4>
<p>So simply deleting that code and letting Rust do the same thing better would be quite sufficient. :)</p>



<a name="200304556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304556">(Jun 09 2020 at 23:35)</a>:</h4>
<p>"D</p>



<a name="200304558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304558">(Jun 09 2020 at 23:35)</a>:</h4>
<p>:D</p>



<a name="200304560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304560">(Jun 09 2020 at 23:35)</a>:</h4>
<p>thats what I was thinking</p>



<a name="200304622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304622">(Jun 09 2020 at 23:36)</a>:</h4>
<p>I'm all for it. Interested in writing a feature-gated PR, and perhaps an allow-by-default lint?</p>



<a name="200304635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304635">(Jun 09 2020 at 23:36)</a>:</h4>
<p>(and then we could crater a commit that changes that to error-by-default, as a test?)</p>



<a name="200304655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304655">(Jun 09 2020 at 23:37)</a>:</h4>
<p>sounds like a good idea</p>



<a name="200304667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304667">(Jun 09 2020 at 23:37)</a>:</h4>
<p>I should say, this should probably get written up as a proposed plan, first. :)</p>



<a name="200304681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304681">(Jun 09 2020 at 23:37)</a>:</h4>
<p>Then with lang team signoff, we can move forward with that proposal.</p>



<a name="200304682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304682">(Jun 09 2020 at 23:37)</a>:</h4>
<p>RFC? or new processs</p>



<a name="200304740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304740">(Jun 09 2020 at 23:38)</a>:</h4>
<p>Not RFC; I was thinking just an issue and a poll. I don't think we have the machinery for the new process ready yet.</p>



<a name="200304773"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304773" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304773">(Jun 09 2020 at 23:38)</a>:</h4>
<p>okay</p>



<a name="200304778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304778">(Jun 09 2020 at 23:38)</a>:</h4>
<p>ill open an issue rn</p>



<a name="200304784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304784">(Jun 09 2020 at 23:38)</a>:</h4>
<p>So, I'd suggest: file issue on rust-lang/rust, label T-lang and I-nominated, we'll talk about it next meeting and then FCP it to gauge consensus.</p>



<a name="200304807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304807">(Jun 09 2020 at 23:39)</a>:</h4>
<p>okay</p>



<a name="200304823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304823">(Jun 09 2020 at 23:39)</a>:</h4>
<p>Can you include the above possible plan steps, of introducing a future compatibility lint (schedule TBD but to be tested via crater) and making the change in the next edition?</p>



<a name="200304827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304827">(Jun 09 2020 at 23:39)</a>:</h4>
<p>Thank you!</p>



<a name="200304932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200304932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200304932">(Jun 09 2020 at 23:41)</a>:</h4>
<p>ill do my best to include all the steps you've mentioned, and ill link the issue here in a sec so you can double check i didnt miss anything :)</p>



<a name="200305564"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200305564" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200305564">(Jun 09 2020 at 23:50)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/73191">https://github.com/rust-lang/rust/issues/73191</a> baby RFC</p>



<a name="200305566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200305566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200305566">(Jun 09 2020 at 23:50)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span></p>



<a name="200305716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200305716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200305716">(Jun 09 2020 at 23:52)</a>:</h4>
<p>Looks great! I added the labels, otherwise looks good. We'll talk about it on Monday.</p>



<a name="200426675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/213817-t-lang/topic/type%20aliases%20and%20tuple%20structs/near/200426675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/213817-t-lang/topic/type.20aliases.20and.20tuple.20structs.html#200426675">(Jun 10 2020 at 14:51)</a>:</h4>
<p>I think this is a good example of </p>
<p>(a) something that would be a proposal<br>
and (b) something that could (maybe) go straight to PR if approved, though I'm not entirely sure</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>